From 4f5db4762cb7ed32dc53670ae53ea55d6eb5cb0a Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Sat, 14 Jul 2007 10:26:02 +0100 Subject: [PATCH] Remove unused function reserve_boot_memory() and alloc_boot_low_page(). Signed-off-by: Keir Fraser --- xen/arch/x86/x86_64/mm.c | 3 +-- xen/common/page_alloc.c | 38 -------------------------------------- xen/include/xen/mm.h | 3 --- 3 files changed, 1 insertion(+), 43 deletions(-) diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index 7db134545c..600d1a7034 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -64,8 +64,7 @@ void *alloc_xen_pagetable(void) return page_to_virt(pg); } - /* Early pagetables must come from low 1GB of memory. */ - mfn = alloc_boot_low_pages(1, 1); /* 0x0 - 0x40000000 */ + mfn = alloc_boot_pages(1, 1); BUG_ON(mfn == 0); return mfn_to_virt(mfn); } diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 5012c06e42..82bb5368bc 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -249,44 +249,6 @@ void __init init_boot_pages(paddr_t ps, paddr_t pe) } } -int __init reserve_boot_pages(unsigned long first_pfn, unsigned long nr_pfns) -{ - unsigned long i; - - for ( i = 0; i < nr_pfns; i++ ) - if ( allocated_in_map(first_pfn + i) ) - break; - - if ( i != nr_pfns ) - return 0; - - map_alloc(first_pfn, nr_pfns); - return 1; -} - -unsigned long __init alloc_boot_low_pages( - unsigned long nr_pfns, unsigned long pfn_align) -{ - unsigned long pg, i; - - /* Search forwards to obtain lowest available range. */ - for ( pg = first_valid_mfn & ~(pfn_align - 1); - (pg + nr_pfns) <= max_page; - pg = (pg + i + pfn_align) & ~(pfn_align - 1) ) - { - for ( i = 0; i < nr_pfns; i++ ) - if ( allocated_in_map(pg+i) ) - break; - if ( i == nr_pfns ) - { - map_alloc(pg, nr_pfns); - return pg; - } - } - - return 0; -} - unsigned long __init alloc_boot_pages( unsigned long nr_pfns, unsigned long pfn_align) { diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index a5183fd125..2742563fd8 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -41,9 +41,6 @@ paddr_t init_boot_allocator(paddr_t bitmap_start); void init_boot_pages(paddr_t ps, paddr_t pe); unsigned long alloc_boot_pages( unsigned long nr_pfns, unsigned long pfn_align); -unsigned long alloc_boot_low_pages( - unsigned long nr_pfns, unsigned long pfn_align); -int reserve_boot_pages(unsigned long first_pfn, unsigned long nr_pfns); void end_boot_allocator(void); /* Xen suballocator. These functions are interrupt-safe. */ -- 2.30.2